<? ////id, email, smokedperday, costperpack, day, month, year
$email = $_POST['email'];
$day = $_POST['day'];
$month = $_POST['month'];
$year = $_POST['year'];
$smokedperday = $_POST['smokedperday'];
$costperpack = $_POST['costperpack'];
$icon = "./resources/icons/".$_POST['icon'];

if(!is_file($icon)){
	$icon = "./resources/icons/".$defaulticon;
}

$insert = $db->query("INSERT INTO smokefree (email,smokedperday,costperpack,day,month,year,icon) VALUES ('$email','$smokedperday','$costperpack','$day','$month','$year','$icon')");
$key = $db->insert_id();
?>